+2005-02-02 Tor Lillqvist <tml@novell.com>
+
+ Implement lazy extended input initialization on Win32, by Robert
+ Ögren. Fixes #163163, possibly #162334. Lazy initialization would
+ be a good idea in any case even if it didn't fix any visible
+ problems, though.
+
+ The Wacom tablet driver seems to get confused if Wintab is
+ initialized but no window is shown before the process exits. This
+ is the case for some GIMP plug-ins, for instance.
+
+ * gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
+ non-static (and renamed).
+ (_gdk_input_init): Don't call _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput.c (gdk_devices_list,
+ gdk_display_list_devices, gdk_input_set_extension_events): Call
+ _gdk_input_wintab_init_check() here instead.
+
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
+2005-02-02 Tor Lillqvist <tml@novell.com>
+
+ Implement lazy extended input initialization on Win32, by Robert
+ Ögren. Fixes #163163, possibly #162334. Lazy initialization would
+ be a good idea in any case even if it didn't fix any visible
+ problems, though.
+
+ The Wacom tablet driver seems to get confused if Wintab is
+ initialized but no window is shown before the process exits. This
+ is the case for some GIMP plug-ins, for instance.
+
+ * gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
+ non-static (and renamed).
+ (_gdk_input_init): Don't call _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput.c (gdk_devices_list,
+ gdk_display_list_devices, gdk_input_set_extension_events): Call
+ _gdk_input_wintab_init_check() here instead.
+
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
+2005-02-02 Tor Lillqvist <tml@novell.com>
+
+ Implement lazy extended input initialization on Win32, by Robert
+ Ögren. Fixes #163163, possibly #162334. Lazy initialization would
+ be a good idea in any case even if it didn't fix any visible
+ problems, though.
+
+ The Wacom tablet driver seems to get confused if Wintab is
+ initialized but no window is shown before the process exits. This
+ is the case for some GIMP plug-ins, for instance.
+
+ * gdk/win32/gdkinput-win32.c (_gdk_input_wintab_init_check): Made
+ non-static (and renamed).
+ (_gdk_input_init): Don't call _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput-win32.h: Declare _gdk_input_wintab_init_check().
+
+ * gdk/win32/gdkinput.c (gdk_devices_list,
+ gdk_display_list_devices, gdk_input_set_extension_events): Call
+ _gdk_input_wintab_init_check() here instead.
+
2005-02-02 Ivan, Wong Yat Cheung <email@ivanwong.info>
* gdk/win32/gdkselection.c: Use a FIFO list for storing GdkSelProp
static GdkDevicePrivate *gdk_input_find_dev_from_ctx (HCTX hctx,
UINT id);
-static GList *wintab_contexts;
+static GList *wintab_contexts = NULL;
-static GdkWindow *wintab_window;
+static GdkWindow *wintab_window = NULL;
#endif /* HAVE_WINTAB */
#endif
-static void
-gdk_input_wintab_init (void)
+void
+_gdk_input_wintab_init_check (void)
{
+ static gboolean wintab_initialized = FALSE;
GdkDevicePrivate *gdkdev;
GdkWindowAttr wa;
WORD specversion;
int devix, cursorix;
char devname[100], csrname[100];
- _gdk_input_devices = NULL;
+ if (wintab_initialized)
+ return;
+
+ wintab_initialized = TRUE;
+
wintab_contexts = NULL;
if (!_gdk_input_ignore_wintab &&
_gdk_init_input_core (display);
#ifdef HAVE_WINTAB
- gdk_input_wintab_init ();
+#ifdef WINTAB_NO_LAZY_INIT
+ /* Normally, Wintab is only initialized when the application performs
+ * an action that requires it, such as enabling extended input events
+ * for a window or enumerating the devices.
+ */
+ _gdk_input_wintab_init_check ();
+#endif /* WINTAB_NO_LAZY_INIT */
#endif /* HAVE_WINTAB */
_gdk_input_devices = g_list_append (_gdk_input_devices, display->core_pointer);
GdkTimeCoord ***events,
gint *n_events);
+#ifdef HAVE_WINTAB
+void _gdk_input_wintab_init_check (void);
+#endif /* HAVE_WINTAB */
+
#endif /* __GDK_INPUT_WIN32_H__ */
GList *
gdk_devices_list (void)
{
+#ifdef HAVE_WINTAB
+ _gdk_input_wintab_init_check ();
+#endif /* HAVE_WINTAB */
return _gdk_input_devices;
}
GList *
gdk_display_list_devices (GdkDisplay *dpy)
{
+#ifdef HAVE_WINTAB
+ _gdk_input_wintab_init_check ();
+#endif /* HAVE_WINTAB */
return _gdk_input_devices;
}
if (mask != 0)
{
+#ifdef HAVE_WINTAB
+ _gdk_input_wintab_init_check ();
+#endif /* HAVE_WINTAB */
iw = g_new(GdkInputWindow,1);
iw->window = window;